﻿<extend name="Public:base" />
<block name="title"><title>加入团队</title></block>
<block name="header_styles">
    <style type="text/css">
        /*body {
            background-color: #efefde;
        }*/
    </style>
</block>
<block name="main">
    <div class="text-center">
        <if condition='$timeout eq 1'>
            <div class="invitation-messages">
                <p>该邀请由于超时，已失效。</p>您可<a href='{:U(' />')}' style="font-weight: lighter;color: #0078E7;text-decoration: underline">随便逛逛</a>。
            </div>
            <else />
            <div class="invitation-messages">
                <strong><a href='{$senderid|genTalentURL}'>{$sender}</a></strong> 邀请你加入他的团队<strong>{$teamname}</strong>，任职<strong>{$jobname}</strong>是否接受？
            </div>
            <div class="invitation-buttons">
                <a href="javascript:void(0);" data-rtype="1" class="reply buttons btn-accept">接受邀请</a>
                <a href="javascript:void(0);" data-rtype="2" class="reply buttons btn-deny">拒绝邀请</a>
            </div>
        </if>
    </div>
    <div id="echobox" style="display: none;"></div>
</block>
<block name="footer_scripts">

    <script type="text/javascript">
        require(["jquery"], function () {
            //反馈
            $(".reply").on("click", function () {
                var rtype = $(this).data("rtype");
                var url = "{:U('Index/replyInvite')}";
                var token = '{$token}';
                $.post(url, { 'reply': rtype, 'token': token }, function (data) {
                    $('#echobox').html(data);
                }, 'html');
            });
        });
    </script>

</block>
